package com.aaa.marketresearch.webclient.gwt.domain;

import com.google.gwt.json.client.JSONObject;

/**
 * @author Nail
 */
public class BillContent {

    private String familyMemberName;
    private String profession;
    private String goodsName;
    private String marketName;
    private Long barcode;
    private String capacity;
    private String payedValue;

    public String getFamilyMemberName() {
        return familyMemberName;
    }

    public String getProfession() {
        return profession;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public String getMarketName() {
        return marketName;
    }

    public Long getBarcode() {
        return barcode;
    }

    public String getCapacity() {
        return capacity;
    }

    public String getPayedValue() {
        return payedValue;
    }

    public BillContent(JSONObject jObj) {
        this.familyMemberName = jObj.get("familyMemberName").isString().stringValue();
        this.profession = jObj.get("profession").isString().stringValue();
        this.goodsName = jObj.get("goodsName").isString().stringValue();
        this.marketName = jObj.get("marketName").isString().stringValue();
        this.barcode = (long) jObj.get("barcode").isNumber().doubleValue();
        this.capacity = jObj.get("capacity").isString().stringValue();
        this.payedValue = jObj.get("payedValue").isString().stringValue();
    }

}
